import { createRouter, createWebHistory } from 'vue-router'
// 注意这里的路径已经改为从components文件夹导入
import HomeView from '../components/HomeView.vue'
import CityInfoView from '../components/CityInfoView.vue'
import AboutView from '../components/AboutView.vue'

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/city-info',
        name: 'city-info',
        component: CityInfoView
    },
    {
        path: '/about',
        name: 'about',
        component: AboutView
    }
]

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})

export default router